<?php

namespace App\Api\Controllers;

use App\Api\Dao\DistrictDao;
use App\Api\Logic\DistrictLogic;
use Illuminate\Http\Request;

class DistrictController extends BaseController
{
    /**
     * @param Request $request
     * @param DistrictLogic $districtLogic
     * @param DistrictDao $districtDao
     * @return \Illuminate\Http\JsonResponse
     * @throws \App\Exceptions\ValidationException
     */
    public function getDistrict(Request $request,DistrictLogic $districtLogic,DistrictDao $districtDao){
        $params = $request->all();
        $districtLogic->get_district($params);
        $result = $districtDao->getDistrict($params);
        return $this->success($result);
    }
}
